package edu.sctu.xialei.june.day20150626one.map.practice;

import java.util.HashMap;
import java.util.Iterator;

/**
 * Created by Administrator on 2015/6/26.
 */
public class HashMapDemo {
    private HashMap<String,Integer> hashMap = new HashMap<String,Integer>();

    public void setHashMap(){
        hashMap.put("夏磊",19);
        hashMap.put("小水",18);
        hashMap.put("缪静",18);
        hashMap.put("老黄",25);
    }

    public void printHashMap(){
        System.out.println(hashMap.size());
        System.out.println(hashMap.containsKey("小水"));
        System.out.println(hashMap.entrySet());
        System.out.println(hashMap.remove("老黄"));
        System.out.println(hashMap.entrySet());
    }

}
